/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

$title_dark_grey: var(--grey-900, #202124);
$chip_blue: var(--blue-700, #1967d2);
$insights_bg_grey: #eee;
$text_grey: var(--Grey-800, #3c4043);
$text_green: var(--Green-500, #34a853);
$text_red: var(--Red-600, #d93025);

$google_sans: 'Google Sans Display', 'Google Sans', sans-serif;
$roboto: Roboto;

body {
  background: #fafbfb;
  font-family: $google_sans;
  -webkit-font-smoothing: antialiased;
  flex-shrink: 0;
}

.header {
  height: 40px;
  margin-top: 26px;
  margin-left: 30px;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 28px;
}

.logo {
  width: 40px;
  height: 40px;
}

.title {
  color: $title_dark_grey;
  font-family: $google_sans;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 32px;
}

chips {
  display: inline-flex;
  gap: 8px;
  padding-top: 36px;
  padding-bottom: 32px;
  padding-left: 29px;
  flex-shrink: 0;
}

chip {
  display: inline-flex;
  height: 32px;
  padding: 6px 12px;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;

  border-radius: 100px;
  background: #e8f0fe;

  color: $chip_blue;
  text-align: center;

  font-family: $google_sans;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.25px;
}

cards {
  display: flex;
  flex-direction: column;
  row-gap: 32px;
  margin: 32px 32px 0px 50px;
}

card {
  border-radius: 8px;
  border: 1px solid #dadce0;
  background: #fff;

  display: flex;
  flex-direction: column;

  > card-title {
    padding: 22px 32px;

    color: $title_dark_grey;
    font-family: $google_sans;
    font-size: 28px;
    font-style: normal;
    font-weight: 400;
    line-height: 50px;
  }

  > card-insights {
    display: flex;
    flex-direction: row;
    padding: 22px 20px;
    background: $insights_bg_grey;

    p.insights-text {
      margin: 0px 25px;
      color: $text_grey;

      font-family: $roboto;
      font-size: 16px;
      font-style: normal;
      font-weight: 400;
      line-height: 24px;
      letter-spacing: 0.1px;
    }
  }
}

/* [charts] container is a flexbox that will contain [chart] child elements. */
charts {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;

  gap: 50px;
  padding: 59px 69px;

  @mixin chart-style {
    display: flex;
    flex-flow: column nowrap;

    gap: 12px;
  }

  chart {
    @include chart-style;

    > chart-description {
      color: $text_grey;
      font-family: $google_sans;

      font-size: 12px;
      font-style: normal;
      font-weight: 400;
      line-height: 16px;
      max-width: 450px;
    }
  }

  chart-table {
    @include chart-style;

    .chart-table-title {
      color: $text_grey;
      font-family: $google_sans;
      font-size: 18px;
      font-style: normal;
      font-weight: 400;
      line-height: 24px;
      margin-bottom: 10px;
    }

    .chart-table-content {
      color: $text_grey;
      font-family: $roboto;

      font-size: 14px;
      font-style: normal;
      font-weight: 400;
      line-height: 20px;
      letter-spacing: 0.2px;

      @mixin border-style {
        border-radius: 4px;
        border: 1px solid var(--Grey-300, #dadce0);
        border-spacing: 0;
        border-collapse: collapse;
      }

      table {
        @include border-style;
      }

      tr {
        @include border-style;

        th,
        td {
          padding: 18px 16px;
        }
      }
    }

    .chart-table-description {
      color: $text_grey;
      font-family: $google_sans;

      font-size: 12px;
      font-style: normal;
      font-weight: 400;
      line-height: 16px;
      max-width: 450px;
    }
  }
}

stats-section {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  padding: 32px;

  stats {
    display: flex;
    flex-direction: column;

    > stats-title {
      color: $title_dark_grey;
      font-family: $roboto;
      font-size: 14px;
      font-style: normal;
      font-weight: 500;
      line-height: 20px;
      letter-spacing: 0.25px;
    }

    > stat {
      color: $text_grey;
      font-family: $roboto;
      font-size: 32px;
      font-style: normal;
      font-weight: 400;
      line-height: 40px;
    }

    > delta {
      color: $text_grey;
      font-family: $roboto;
      font-size: 18px;
      font-style: normal;
      font-weight: 500;
      line-height: 20px;
      letter-spacing: 0.25px;
    }

    .green-text {
      color: $text_green;
    }

    .red-text {
      color: $text_red;
    }
  }
}
